package cn.py.boot_lua.controller.test;

import org.bytedeco.javacv.FFmpegFrameGrabber;


public class Ku {
    public static void main(String[] args) throws Exception {
        FFmpegFrameGrabber grabber = FFmpegFrameGrabber.createDefault("C:/Users/Administrator/Desktop/video/a21593f817.mp4");
        grabber.start();
        long durationMs = grabber.getLengthInTime(); // 单位是微秒
        System.out.println("视频时长: " + (durationMs / 1_000_000) + "秒");
    }

}
